﻿@model cloudscribe.Core.IdentityServerIntegration.Models.ApiItemViewModel
@using cloudscribe.Core.IdentityServerIntegration
@using Microsoft.Extensions.Localization
@inject IStringLocalizer<CloudscribeIds4Resources> sr
<form asp-controller="ApiResource" asp-action="NewApiResource">
    <input asp-for="SiteId" type="hidden" />
    <div class="form-horizontal">
        <div asp-validation-summary="All" class="text-danger"></div>
        <div class="form-group">
            <label for="Name" class="col-md-2 control-label">@sr["Name"]</label>
            <div class="col-md-10">
                <input class="form-control" asp-for="Name"  />
                @Html.ValidationMessage("apinameinuseerror", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            <label for="DisplayName" class="col-md-2 control-label">@sr["Display Name"]</label>
            <div class="col-md-10">
                <input class="form-control" asp-for="DisplayName"  />
            </div>
        </div>
        <div class="form-group">
            <label for="Description" class="col-md-2 control-label">@sr["Description"]</label>
            <div class="col-md-10">
                <input class="form-control" asp-for="Description"  />
            </div>
        </div>  
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <button name="submit" type="submit" class="btn btn-default">@sr["Create"]</button>
                <a class="btn btn-default" asp-action="Index" asp-controller="Scopes"
                   asp-route-siteId="@Model.SiteId">@sr["Cancel"]</a>
            </div>
        </div>
    </div>
</form>
